package com.ship.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
 * 船舶信息
 * @author wqf
 * @version  Nov 24, 2011 9:49:12 AM
 */
@Entity
@org.hibernate.annotations.Entity(
		selectBeforeUpdate = true, 
		dynamicInsert = true, 
		dynamicUpdate = true
)
@Table(name="ship_info")
public class ShipInfo implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3794798786007109238L;

	@Id
	@GeneratedValue
	private Long id;
	
	/**
	 * 开始日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date startDate;
		
	/**
	 * 创建日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date createDate;
	
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	/**
	 * 船名
	 */
	@Column(length=200)
	private String shipName;
		
	/**
	 * 国籍
	 */
	@Column(length=100)
	private String nationality;
	
	/**
	 * 总吨
	 */
	@Column(length=50)
	private String total;
	
	/**
	 * 净吨
	 */
	@Column(length=50)
	private String netton;
	
	/**
	 * IMO
	 */
	@Column(length=50)
	private String imo;
	
	/**
	 * 呼号
	 */
	@Column(length=50)
	private String no;
		
	/**
	 * 工程号
	 */
	@Column(length=50)
	private String jobnumber;
	/**
	 * 出库单号
	 */
	@Column(length=50)
	private String outNumber;
	
	/**
	 * 代理
	 */
	@Column(length=50)
	private String agent;
		
	/**
	 * 状态
	 */
	@Column
	private Boolean status;
	
	@ManyToOne
	@JoinColumn(name="user_id",referencedColumnName="id")
	private User user = new User();
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public String getShipName() {
		return shipName;
	}

	public void setShipName(String shipName) {
		this.shipName = shipName;
	}

	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}

	public String getTotal() {
		return total;
	}

	public void setTotal(String total) {
		this.total = total;
	}

	public String getNetton() {
		return netton;
	}

	public void setNetton(String netton) {
		this.netton = netton;
	}

	public String getImo() {
		return imo;
	}

	public void setImo(String imo) {
		this.imo = imo;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getJobnumber() {
		return jobnumber;
	}

	public void setJobnumber(String jobnumber) {
		this.jobnumber = jobnumber;
	}

	public String getAgent() {
		return agent;
	}

	public void setAgent(String agent) {
		this.agent = agent;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}
	
	public String getOutNumber() {
		return outNumber;
	}

	public void setOutNumber(String outNumber) {
		this.outNumber = outNumber;
	}
}
